import { request, METHOD } from '@/utils/services/request'
import { FORM_LIST, ADD_FORM, FORM, DELETE } from '@/services/api'

/**
 * 表单管理
 * @returns {Promise<AxiosResponse<T>>}
 */
export async function listForm (data) {
  return request(FORM_LIST, METHOD.GET, data)
}

/**
 * 新增表单
 * @returns {Promise<AxiosResponse<T>>}
 */
export async function addForm (data) {
  return request(ADD_FORM, METHOD.POST, data)
}

/**
 * 查询表单
 * @returns {Promise<AxiosResponse<T>>}
 */
export async function formId (id) {
  return request(`${FORM}/${id}`, METHOD.GET)
}

/**
 * 删除表单
 * @returns {Promise<AxiosResponse<T>>}
 */
export async function deleteformId (id) {
  return request(`${DELETE}/${id}`, METHOD.GET)
}


